<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="com.bardsoftware.foronuvolo.data.ForumUser"%>
<%@page import="java.util.Collection"%>
<%@page import="com.bardsoftware.foronuvolo.data.FeedForListening"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>User feeds</title>
</head>
<body>
<% 
	String userId = request.getParameter("userId");
	ForumUser user = ForumUser.find(userId);
%>
<b>Hello, <%= user.getDisplayName()%>!</b><br>
<p>Your feeds:</p><br>
<%
	Collection<FeedForListening> feeds = FeedForListening.getAllFeeds();
	if(feeds == null)
		return;
	for(FeedForListening feed : feeds) {
		if(feed.getSubscribers().contains(userId)) {
			%>
			<%= feed.getFeedURL() %>[<%= feed.getLastUpd() %>]<br>
			<%
		}
	}
%>
</body>
</html>